///////////////////////////////////////////////////
////             Game Popup                      //
///////////////////////////////////////////////////

// Show The popup
// get: hoveritem & popup_id
function ShowPopup(hoveritem,popup_id,x_offser,y_offset)
{
    // get hoveritem absolute pos
    var rect = hoveritem.getBoundingClientRect();
    hp = document.getElementById(popup_id);

    // Set position of hover-over popup
    hp.style.top = parseInt(rect.top+y_offset) + "px";
    hp.style.left = parseInt(rect.left+x_offser) + "px";

    // Set popup to visible
    hp.style.visibility = "Visible";
}

// Hide the Popup
// get: popup_id
function HidePopup(popup_id)
{
	hp = document.getElementById(popup_id);
	hp.style.visibility = "Hidden";
}